package org.dtrd.config.common;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * H5 与 小程序路径配置
 *
 * @author xiao
 * @date 2022/8/1 11:02 AM
 */
@Configuration
public class PathConfiguration {

    @Value("${dtrd.domain.h5}")
    private String h5Path;
    @Value("${dtrd.domain.api}")
    private String apiRootUrl;
    @Value("${dtrd.chat.chatroom_url}")
    private String chatroomUrl;

    @Value("${dtrd.path.h5.orgDetail}")
    private String orgDetailUrl;

    @Bean
    public void initH5Configuration() {
        PathUtil.setH5Domain(h5Path);
        PathUtil.setChatroomUrl(chatroomUrl);
        PathUtil.setApiRootUrl(apiRootUrl);
        PathUtil.setOrgDetailUrl(orgDetailUrl);


    }

}
